package com.guli.order.service;
/*
 * @Author 罗俊
 * @date 2020/11/18 - 1:17 下午
 *
 */

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guli.order.entity.OrderEntity;
import com.guli.order.vo.AliPayCallBackVo;
import com.guli.order.vo.OrderAndOrderItemsVo;
import com.guli.order.vo.OrderSubmitVo;
import com.guli.order.vo.PreOrderInfoVo;

import java.math.BigDecimal;
import java.util.Map;
import java.util.concurrent.ExecutionException;

public interface OrderService extends IService<OrderEntity> {

    Page<OrderAndOrderItemsVo> queryPage(Integer currentPage, Integer size, Map<String, Object> params);

    PreOrderInfoVo getPrePaymentInfo() throws ExecutionException, InterruptedException;

    String submitOrder(OrderSubmitVo orderSubmitVo) throws Throwable;

    OrderEntity getOrderByOrderSn(String orderSn);

    /**
     * 更新订单的支付状态
     * @param orderSn
     */
    boolean updatePaymentStatus(String orderSn);

    void submitOrder(String orderSn, Long memberId, Long spuId, Long skuId, Integer count, BigDecimal price);
}
